from playLA.Vector import Vector

if __name__=="__main__":
    vec = Vector([5,2])
    print( vec )
    print( len(vec))
    print( "vec[0]={},vec[1]={}".format(vec[0],vec[1]))

    vec1 = Vector([3,1])
    print("{}+{}={}".format(vec,vec1,vec+vec1))
    print("{}-{}={}".format(vec,vec1,vec-vec1))

    print("{}*{}={}".format(vec,3,vec*3))
    print("{}*{}={}".format(3,vec,3*vec))

    print("+{}={}".format(vec, +vec))
    print("-{}={}".format(vec,-vec))

    zero2 = Vector.zero(2)
    print(zero2)

    print("{}+{}={}".format(vec,zero2,vec+zero2))

    print("norm({})={}".format(vec,vec.norm()))
    print("norm({})={}".format(vec1,vec1.norm()))

    print("normalize {} is {}".format(vec1, vec1.normalize()))
    print(vec1.normalize().norm())

    print(vec.dot(vec1))